feat: add ruler instructions for the project#643
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds Ruler configuration and documentation for managing coding-assistant instructions, plus gitignore entries for generated and backup files. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Comment |
Greptile OverviewGreptile SummaryThis PR introduces Ruler, a tool for managing AI coding assistant instructions across the codebase. The changes add configuration files and backend coding standards to guide AI assistants like GitHub Copilot and Junie. Key changes:
Minor issue:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| .gitignore | Added Ruler-generated files to gitignore including backup files, agent instructions, and config files |
| .ruler/backend.md | New AI agent instructions for backend development including coding standards, testing requirements, and Django practices; minor version discrepancy with Python 3.14 vs actual >=3.13 |
| .ruler/ruler.toml | Ruler configuration file enabling copilot and junie agents, but junie agent instructions file is missing from the PR |
| README.md | Added comprehensive documentation for managing coding assistants using Ruler, including installation and usage instructions |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In @.ruler/backend.md:
- Line 8: The backend.md entry currently states "Use Python 3.14" which
conflicts with README.md and the dev setup that require Python 3.13; update the
version string in .ruler/backend.md from "Python 3.14" to "Python 3.13" so it
matches the README and the venv creation instructions (search for the literal
"Python 3.14" in .ruler/backend.md and replace it with "Python 3.13").
- Around line 43-45: Update the wording in .ruler/backend.md to correct the uv
workflow: replace the incorrect instruction that says to use `uv pip install
<package>` for adding dependencies with the correct `uv add <package>` command,
and clarify that `uv pip install` only installs into the environment and does
not modify pyproject.toml or uv.lock; keep the guidance that uv should update
pyproject.toml and uv.lock automatically and that uv.lock must not be edited
manually.
In @.ruler/ruler.toml:
- Around line 6-14: default_agents includes "junie" but there's no
[agents.junie] section; either add a configuration block for junie (create a
[agents.junie] section with enabled = true and output_path =
".junie/guidelines.md") so the agent is properly configured (matching the
.junie/guidelines.md gitignore entry), or remove "junie" from default_agents
until you add the corresponding [agents.junie] settings; update the ruler.toml
to reflect whichever choice.
In `@README.md`:
- Around line 148-150: The sentence fragment "To add a new coding assistant" in
README.md is incomplete; update it to a full sentence before the numbered list
(for example: "To add a new coding assistant, follow these steps:") so the prose
reads correctly and flows into the subsequent numbered steps; ensure the exact
phrase "To add a new coding assistant" is replaced or extended to form a
complete sentence with appropriate punctuation.
🧹 Nitpick comments (2)
README.md (1)
131-139: Add language specification to fenced code blocks.The code blocks should specify the language (e.g.,
bashorshell) for proper syntax highlighting and to satisfy linting rules.📝 Proposed fix
-``` +```bash npm install -g `@intellectronica/ruler`or with NPX:
-
+bash
npx@intellectronica/rulerapply.gitignore (1)
440-448: Broad*.bakpattern may have unintended side effects.The
*.bakpattern on line 441 will ignore all.bakfiles throughout the entire repository, not just Ruler-generated backups. This could unintentionally hide other backup files. Additionally, the specific.bakpatterns on lines 443, 445, and 447 become redundant.Consider either:
- Removing the global
*.bakand keeping only the specific paths, or- Keeping the global
*.bakif that's the intended behavior and removing the redundant specific.bakentriesOption 1: Keep only specific paths
# START Ruler Generated Files -*.bak .github/copilot-instructions.md .github/copilot-instructions.md.bak .junie/guidelines.md .junie/guidelines.md.bak .vscode/mcp.json .vscode/mcp.json.bak # END Ruler Generated FilesOption 2: Keep global pattern, remove redundant entries
# START Ruler Generated Files *.bak .github/copilot-instructions.md -.github/copilot-instructions.md.bak .junie/guidelines.md -.junie/guidelines.md.bak .vscode/mcp.json -.vscode/mcp.json.bak # END Ruler Generated Files
| - Add dependencies using uv: `uv pip install <package>`. | ||
| - Let uv update `pyproject.toml` and `uv.lock` automatically. | ||
| - Never manually edit `uv.lock`. |
There was a problem hiding this comment.
Incorrect uv dependency management instructions.
The command uv pip install <package> does not automatically update pyproject.toml. The uv pip subcommand is a pip-compatible interface that installs into the environment without modifying project files.
To add dependencies and update pyproject.toml, the correct command is uv add <package>.
📝 Proposed fix
## Dependency Management
-- Add dependencies using uv: `uv pip install <package>`.
-- Let uv update `pyproject.toml` and `uv.lock` automatically.
+- Add dependencies using uv: `uv add <package>`.
+- This will update `pyproject.toml` and `uv.lock` automatically.
- Never manually edit `uv.lock`.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Add dependencies using uv: `uv pip install <package>`. | |
| - Let uv update `pyproject.toml` and `uv.lock` automatically. | |
| - Never manually edit `uv.lock`. | |
| - Add dependencies using uv: `uv add <package>`. | |
| - This will update `pyproject.toml` and `uv.lock` automatically. | |
| - Never manually edit `uv.lock`. |
🤖 Prompt for AI Agents
In @.ruler/backend.md around lines 43 - 45, Update the wording in
.ruler/backend.md to correct the uv workflow: replace the incorrect instruction
that says to use `uv pip install <package>` for adding dependencies with the
correct `uv add <package>` command, and clarify that `uv pip install` only
installs into the environment and does not modify pyproject.toml or uv.lock;
keep the guidance that uv should update pyproject.toml and uv.lock automatically
and that uv.lock must not be edited manually.
d8c5559 to
fd55f2e
Compare
Summary by CodeRabbit
Documentation
Chores